package year2019.month01;

/**
 * @desc 描述
 * create on 2019/1/26 by watson
 */
public interface Vehicle {
    public default void print(){
        System.out.println("我是一辆车!");
    }

    default void println(){
        System.out.println("我是一辆车!");
    }

    // 静态方法
    public static void blowHorn(){
        System.out.println("按喇叭!!!");
    }

    // 静态方法
    static void blowHorn2(){
        System.out.println("按喇叭two!!!");
    }

}

class VehicleImpl implements Vehicle{

    public void print(){
//        Vehicle.super.print();
        System.out.println("实现类，我是一辆车!");
    }

    public void println(){
        System.out.println("实现类，我是一辆车!");
    }

    // 静态方法
    public static void blowHorn(){
        System.out.println("实现类，按喇叭!!!");
    }

    // 静态方法
    static void blowHorn2(){
        System.out.println("实现类，按喇叭two!!!");
    }

    public static void main(String[] args){
        VehicleImpl vehicle = new VehicleImpl();
        vehicle.println();
        vehicle.print();

        Vehicle.blowHorn();
        Vehicle.blowHorn2();
        VehicleImpl.blowHorn();
        VehicleImpl.blowHorn2();
    }
}
